package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by LN on 2018/1/5
 */
@Entity
@DynamicInsert
@Table(name = "sign_in_reissue_detail_share")
public class SignInReissueDetailShareEntity extends BaseEntity {
    private String memberNo;
    private String fromMember;
    private Date month;
    private String isUsed;
    private String headUrl;
    private String nickName;

    @Basic
    @Column(name = "member_no")
    public String getMemberNo() {
        return memberNo;
    }

    public void setMemberNo(String memberNo) {
        this.memberNo = memberNo;
    }

    @Basic
    @Column(name = "from_member")
    public String getFromMember() {
        return fromMember;
    }

    public void setFromMember(String from) {
        this.fromMember = from;
    }

    @Basic
    @Column(name = "month")
    public Date getMonth() {
        return month;
    }

    public void setMonth(Date month) {
        this.month = month;
    }

    @Basic
    @Column(name = "is_used")
    public String getIsUsed() {
        return isUsed;
    }

    public void setIsUsed(String isUsed) {
        this.isUsed = isUsed;
    }

    @Basic
    @Column(name = "head_url")
    public String getHeadUrl() {
        return headUrl;
    }

    public void setHeadUrl(String headUrl) {
        this.headUrl = headUrl;
    }


    @Basic
    @Column(name = "nick_name")
    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SignInReissueDetailShareEntity that = (SignInReissueDetailShareEntity) o;

        if (memberNo != null ? !memberNo.equals(that.memberNo) : that.memberNo != null) return false;
        if (fromMember != null ? !fromMember.equals(that.fromMember) : that.fromMember != null) return false;
        if (month != null ? !month.equals(that.month) : that.month != null) return false;
        if (isUsed != null ? !isUsed.equals(that.isUsed) : that.isUsed != null) return false;
        if (headUrl != null ? !headUrl.equals(that.headUrl) : that.headUrl != null) return false;
        return nickName != null ? nickName.equals(that.nickName) : that.nickName == null;
    }

    @Override
    public int hashCode() {
        int result = memberNo != null ? memberNo.hashCode() : 0;
        result = 31 * result + (fromMember != null ? fromMember.hashCode() : 0);
        result = 31 * result + (month != null ? month.hashCode() : 0);
        result = 31 * result + (isUsed != null ? isUsed.hashCode() : 0);
        result = 31 * result + (headUrl != null ? headUrl.hashCode() : 0);
        result = 31 * result + (nickName != null ? nickName.hashCode() : 0);
        return result;
    }
}
